/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Resource
Interface of Resource

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKJdro/JdroApiModel.h>


@implementation JdroValidateTemplateResult
-(id) initWithDescribe:(NSString*) describe
        result:(NSObject*)result { 
    self.describe = describe;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self describe])
    {
        [result setValue:[self describe] forKey:@"describe"];
    }
    if([self result])
    {
        [result setValue:[self result] forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.describe = [dictionary objectForKey:@"describe"];
    self.result = [dictionary objectForKey:@"result"];
    return self;
} 

@end
@implementation JdroDescribeStacksRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
stackName:(NSString*)stackName
action:(NSString*)action
status:(NSString*)status
createStartTime:(NSString*)createStartTime
createEndTime:(NSString*)createEndTime
updateStartTime:(NSString*)updateStartTime
updateEndTime:(NSString*)updateEndTime
sortField:(NSString*)sortField
sortBy:(NSString*)sortBy { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.stackName = stackName;
    self.action = action;
    self.status = status;
    self.createStartTime = createStartTime;
    self.createEndTime = createEndTime;
    self.updateStartTime = updateStartTime;
    self.updateEndTime = updateEndTime;
    self.sortField = sortField;
    self.sortBy = sortBy;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
stackName:(NSString*)stackName
action:(NSString*)action
status:(NSString*)status
createStartTime:(NSString*)createStartTime
createEndTime:(NSString*)createEndTime
updateStartTime:(NSString*)updateStartTime
updateEndTime:(NSString*)updateEndTime
sortField:(NSString*)sortField
sortBy:(NSString*)sortBy { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.stackName = stackName;
    self.action = action;
    self.status = status;
    self.createStartTime = createStartTime;
    self.createEndTime = createEndTime;
    self.updateStartTime = updateStartTime;
    self.updateEndTime = updateEndTime;
    self.sortField = sortField;
    self.sortBy = sortBy;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self stackName])
    {
        [result setValue:[self stackName] forKey:@"stackName"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self createStartTime])
    {
        [result setValue:[self createStartTime] forKey:@"createStartTime"];
    }
    if([self createEndTime])
    {
        [result setValue:[self createEndTime] forKey:@"createEndTime"];
    }
    if([self updateStartTime])
    {
        [result setValue:[self updateStartTime] forKey:@"updateStartTime"];
    }
    if([self updateEndTime])
    {
        [result setValue:[self updateEndTime] forKey:@"updateEndTime"];
    }
    if([self sortField])
    {
        [result setValue:[self sortField] forKey:@"sortField"];
    }
    if([self sortBy])
    {
        [result setValue:[self sortBy] forKey:@"sortBy"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.stackName = [dictionary objectForKey:@"stackName"];
    self.action = [dictionary objectForKey:@"action"];
    self.status = [dictionary objectForKey:@"status"];
    self.createStartTime = [dictionary objectForKey:@"createStartTime"];
    self.createEndTime = [dictionary objectForKey:@"createEndTime"];
    self.updateStartTime = [dictionary objectForKey:@"updateStartTime"];
    self.updateEndTime = [dictionary objectForKey:@"updateEndTime"];
    self.sortField = [dictionary objectForKey:@"sortField"];
    self.sortBy = [dictionary objectForKey:@"sortBy"];
    return self;
} 

@end
@implementation JdroDescribeStackTemplateResult
-(id) initWithTemplate:(NSString*) template { 
    self.template = template;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self template])
    {
        [result setValue:[self template] forKey:@"template"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.template = [dictionary objectForKey:@"template"];
    return self;
} 

@end
@implementation JdroDescribeStackRequest
-(id) initWithRegion:(NSString *)regionId
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.stackId = stackId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.version = version;
    self.stackId = stackId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self stackId])
    {
        [result setValue:[self stackId] forKey:@"stackId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.stackId = [dictionary objectForKey:@"stackId"];
    return self;
} 

@end
@implementation JdroCreateChangeSetResult
-(id) initWithId:(NSString*) idValue { 
    self.idValue = idValue;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    return self;
} 

@end
@implementation JdroExecuteChangeSetRequest
-(id) initWithRegion:(NSString *)regionId
stackId:(NSString*)stackId
changesetId:(NSString*)changesetId { 
    self.regionId = regionId;
    self.stackId = stackId;
    self.changesetId = changesetId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
stackId:(NSString*)stackId
changesetId:(NSString*)changesetId { 
    self.regionId = regionId;
    self.version = version;
    self.stackId = stackId;
    self.changesetId = changesetId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self stackId])
    {
        [result setValue:[self stackId] forKey:@"stackId"];
    }
    if([self changesetId])
    {
        [result setValue:[self changesetId] forKey:@"changesetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.stackId = [dictionary objectForKey:@"stackId"];
    self.changesetId = [dictionary objectForKey:@"changesetId"];
    return self;
} 

@end
@implementation JdroDeleteStackRequest
-(id) initWithRegion:(NSString *)regionId
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.stackId = stackId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.version = version;
    self.stackId = stackId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self stackId])
    {
        [result setValue:[self stackId] forKey:@"stackId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.stackId = [dictionary objectForKey:@"stackId"];
    return self;
} 

@end
@implementation JdroCreateStackResult
-(id) initWithStackID:(NSString*) stackID { 
    self.stackID = stackID;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self stackID])
    {
        [result setValue:[self stackID] forKey:@"stackID"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.stackID = [dictionary objectForKey:@"stackID"];
    return self;
} 

@end
@implementation JdroDescribeStackTemplateRequest
-(id) initWithRegion:(NSString *)regionId
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.stackId = stackId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.version = version;
    self.stackId = stackId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self stackId])
    {
        [result setValue:[self stackId] forKey:@"stackId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.stackId = [dictionary objectForKey:@"stackId"];
    return self;
} 

@end
@implementation JdroDeleteStackResult
-(id) initWithDetails:(NSString*) details { 
    self.details = details;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self details])
    {
        [result setValue:[self details] forKey:@"details"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.details = [dictionary objectForKey:@"details"];
    return self;
} 

@end
@implementation JdroDescribeStackResourcesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
search:(NSString*)search
product:(NSString*)product
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.search = search;
    self.product = product;
    self.stackId = stackId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
search:(NSString*)search
product:(NSString*)product
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.search = search;
    self.product = product;
    self.stackId = stackId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self search])
    {
        [result setValue:[self search] forKey:@"search"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self stackId])
    {
        [result setValue:[self stackId] forKey:@"stackId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.search = [dictionary objectForKey:@"search"];
    self.product = [dictionary objectForKey:@"product"];
    self.stackId = [dictionary objectForKey:@"stackId"];
    return self;
} 

@end
@implementation JdroDescribeStackEventsRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.stackId = stackId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.stackId = stackId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self stackId])
    {
        [result setValue:[self stackId] forKey:@"stackId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.stackId = [dictionary objectForKey:@"stackId"];
    return self;
} 

@end
@implementation JdroDescribeResourceTypeSpecificationRequest
-(id) initWithRegion:(NSString *)regionId
resourceType:(NSString*)resourceType { 
    self.regionId = regionId;
    self.resourceType = resourceType;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
resourceType:(NSString*)resourceType { 
    self.regionId = regionId;
    self.version = version;
    self.resourceType = resourceType;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self resourceType])
    {
        [result setValue:[self resourceType] forKey:@"resourceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.resourceType = [dictionary objectForKey:@"resourceType"];
    return self;
} 

@end
@implementation JdroDescribeResourceTypeListRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
product:(NSString*)product
search:(NSString*)search { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.product = product;
    self.search = search;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
product:(NSString*)product
search:(NSString*)search { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.product = product;
    self.search = search;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self product])
    {
        [result setValue:[self product] forKey:@"product"];
    }
    if([self search])
    {
        [result setValue:[self search] forKey:@"search"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.product = [dictionary objectForKey:@"product"];
    self.search = [dictionary objectForKey:@"search"];
    return self;
} 

@end
  
@implementation JdroValidateTemplateResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroValidateTemplateResult* result = [[JdroValidateTemplateResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroValidateTemplateResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation JdroValidateTemplateRequest
-(id) initWithRegion:(NSString *)regionId
environment:(Environment*)environment
template:(NSObject*)template
validateMode:(NSString*)validateMode { 
    self.regionId = regionId;
    self.environment = environment;
    self.template = template;
    self.validateMode = validateMode;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
environment:(Environment*)environment
template:(NSObject*)template
validateMode:(NSString*)validateMode { 
    self.regionId = regionId;
    self.version = version;
    self.environment = environment;
    self.template = template;
    self.validateMode = validateMode;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self environment])
    {
        [result setValue:[[self environment] dictionary]forKey:@"environment"];
    }
    if([self template])
    {
        [result setValue:[self template] forKey:@"template"];
    }
    if([self validateMode])
    {
        [result setValue:[self validateMode] forKey:@"validateMode"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.environment = [[Environment alloc]initWithDic:[dictionary objectForKey:@"environment"]];
    self.template = [dictionary objectForKey:@"template"];
    self.validateMode = [dictionary objectForKey:@"validateMode"];
    return self;
} 

@end
@implementation JdroDescribeStacksResult
-(id) initWithList:(NSArray<StackOut*>*) list
        totalCount:(NSNumber*)totalCount { 
    self.list = list;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self list])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self list] count]; i++) {
            StackOut* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
        StackOut* item = [[StackOut alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation JdroDescribeStacksResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDescribeStacksResult* result = [[JdroDescribeStacksResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDescribeStacksResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation JdroExecuteChangeSetResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation JdroDescribeStackResourcesResult
-(id) initWithList:(NSArray<ResourceOut*>*) list
        totalCount:(NSNumber*)totalCount { 
    self.list = list;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self list])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self list] count]; i++) {
            ResourceOut* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
        ResourceOut* item = [[ResourceOut alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation JdroDescribeStackResourcesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDescribeStackResourcesResult* result = [[JdroDescribeStackResourcesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDescribeStackResourcesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation JdroDescribeStackEventsResult
-(id) initWithList:(NSArray<EventOut*>*) list
        totalCount:(NSNumber*)totalCount { 
    self.list = list;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self list])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self list] count]; i++) {
            EventOut* item = [[self list] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"list"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* listArray = [dictionary objectForKey:@"list"];
    if(listArray&&![listArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [listArray count];i++)
        {
        EventOut* item = [[EventOut alloc]initWithDic:[listArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.list = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
@implementation JdroDescribeStackResult
-(id) initWithStack:(StackOut*) stack { 
    self.stack = stack;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self stack])
    {
        [result setValue:[[self stack] dictionary]forKey:@"stack"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.stack = [[StackOut alloc]initWithDic:[dictionary objectForKey:@"stack"]];
    return self;
} 

@end
@implementation JdroCreateStackRequest
-(id) initWithRegion:(NSString *)regionId
environment:(Environment*)environment
template:(NSObject*)template { 
    self.regionId = regionId;
    self.environment = environment;
    self.template = template;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
environment:(Environment*)environment
template:(NSObject*)template { 
    self.regionId = regionId;
    self.version = version;
    self.environment = environment;
    self.template = template;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self environment])
    {
        [result setValue:[[self environment] dictionary]forKey:@"environment"];
    }
    if([self template])
    {
        [result setValue:[self template] forKey:@"template"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.environment = [[Environment alloc]initWithDic:[dictionary objectForKey:@"environment"]];
    self.template = [dictionary objectForKey:@"template"];
    return self;
} 

@end
  
@implementation JdroDescribeStackEventsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDescribeStackEventsResult* result = [[JdroDescribeStackEventsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDescribeStackEventsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation JdroCreateStackResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroCreateStackResult* result = [[JdroCreateStackResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroCreateStackResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation JdroDescribeStackResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDescribeStackResult* result = [[JdroDescribeStackResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDescribeStackResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation JdroCreateChangeSetResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroCreateChangeSetResult* result = [[JdroCreateChangeSetResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroCreateChangeSetResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation JdroDeleteStackResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDeleteStackResult* result = [[JdroDeleteStackResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDeleteStackResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation JdroDescribeStackTemplateResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDescribeStackTemplateResult* result = [[JdroDescribeStackTemplateResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDescribeStackTemplateResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation JdroExecuteChangeSetResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroExecuteChangeSetResult* result = [[JdroExecuteChangeSetResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroExecuteChangeSetResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation JdroCreateChangeSetRequest
-(id) initWithRegion:(NSString *)regionId
environment:(Environment*)environment
template:(NSObject*)template
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.environment = environment;
    self.template = template;
    self.stackId = stackId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
environment:(Environment*)environment
template:(NSObject*)template
stackId:(NSString*)stackId { 
    self.regionId = regionId;
    self.version = version;
    self.environment = environment;
    self.template = template;
    self.stackId = stackId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self environment])
    {
        [result setValue:[[self environment] dictionary]forKey:@"environment"];
    }
    if([self template])
    {
        [result setValue:[self template] forKey:@"template"];
    }
    if([self stackId])
    {
        [result setValue:[self stackId] forKey:@"stackId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.environment = [[Environment alloc]initWithDic:[dictionary objectForKey:@"environment"]];
    self.template = [dictionary objectForKey:@"template"];
    self.stackId = [dictionary objectForKey:@"stackId"];
    return self;
} 

@end
@implementation JdroDescribeResourceTypeSpecificationResult
-(id) initWithPropertyTypes:(NSMutableDictionary<NSString*,PropertyTypes*>*) propertyTypes
        resourceTypes:(ResourceTypes*)resourceTypes { 
    self.propertyTypes = propertyTypes;               
    self.resourceTypes = resourceTypes;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self propertyTypes])
    {
        NSMutableDictionary* propertyTypesDictionary = [[NSMutableDictionary alloc] init];
        NSArray *dicPropertyTypesKeys = [[self propertyTypes] allKeys];
        for (NSString* dicPropertyTypesKey in dicPropertyTypesKeys) {
        PropertyTypes* propertyTypesDictionaryItem = [[self propertyTypes] valueForKey:dicPropertyTypesKey];
            if(propertyTypesDictionaryItem)
            {
                [propertyTypesDictionary setValue:[propertyTypesDictionaryItem dictionary] forKey:dicPropertyTypesKey];
            }
        }
        if(propertyTypesDictionary && [propertyTypesDictionary count]>0)
        {
            [result setValue:propertyTypesDictionary forKey:@"propertyTypes"];
        }
    }
    if([self resourceTypes])
    {
        [result setValue:[[self resourceTypes] dictionary]forKey:@"resourceTypes"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSDictionary* propertyTypesDictionary =  [dictionary objectForKey:@"propertyTypes"];
    if(propertyTypesDictionary)
    {
        NSArray* propertyTypesDictionaryKeys = [propertyTypesDictionary allKeys];
        if(propertyTypesDictionaryKeys && [propertyTypesDictionaryKeys count] >0)
        {
            NSMutableDictionary* propertyTypes= [[NSMutableDictionary alloc]init];
            for (NSString* propertyTypesDictionaryKey in propertyTypesDictionaryKeys) {
                NSDictionary* propertyTypesDictionaryValue = [propertyTypesDictionary valueForKey:propertyTypesDictionaryKey];
                if(propertyTypesDictionaryValue)
                {
                    [propertyTypes setValue:[[PropertyTypes alloc]initWithDic:propertyTypesDictionaryValue] forKey:propertyTypesDictionaryKey];
                }
            }
            if(propertyTypes && [propertyTypes count] > 0)
            {
                self.propertyTypes = propertyTypes;
            }
        }
    }
    self.resourceTypes = [[ResourceTypes alloc]initWithDic:[dictionary objectForKey:@"resourceTypes"]];
    return self;
} 

@end
  
@implementation JdroDescribeResourceTypeSpecificationResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDescribeResourceTypeSpecificationResult* result = [[JdroDescribeResourceTypeSpecificationResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDescribeResourceTypeSpecificationResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation JdroDescribeResourceTypeListResult
-(id) initWithResourceTypeList:(NSArray<DescribeResourceTypeListItem*>*) resourceTypeList
        totalCount:(NSNumber*)totalCount { 
    self.resourceTypeList = resourceTypeList;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self resourceTypeList])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self resourceTypeList] count]; i++) {
            DescribeResourceTypeListItem* item = [[self resourceTypeList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"resourceTypeList"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* resourceTypeListArray = [dictionary objectForKey:@"resourceTypeList"];
    if(resourceTypeListArray&&![resourceTypeListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [resourceTypeListArray count];i++)
        {
        DescribeResourceTypeListItem* item = [[DescribeResourceTypeListItem alloc]initWithDic:[resourceTypeListArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.resourceTypeList = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation JdroDescribeResourceTypeListResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
JdroDescribeResourceTypeListResult* result = [[JdroDescribeResourceTypeListResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(JdroDescribeResourceTypeListResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
